namespace BTSPracCourse.Maps.Samples {
    
    
    [Microsoft.XLANGs.BaseTypes.SchemaReference(@"BTSPracCourse.Schemas.Sample.GreenShieldFlatFileSchema", typeof(BTSPracCourse.Schemas.Sample.GreenShieldFlatFileSchema))]
    [Microsoft.XLANGs.BaseTypes.SchemaReference(@"BTSPracCourse.Schemas.Sample.DrugPriceSchema", typeof(BTSPracCourse.Schemas.Sample.DrugPriceSchema))]
    public sealed class GreenShieldToDrugPriceMap : Microsoft.XLANGs.BaseTypes.TransformBase {
        
        private const string _strMap = @"<?xml version=""1.0"" encoding=""UTF-16""?>
<xsl:stylesheet xmlns:xsl=""http://www.w3.org/1999/XSL/Transform"" xmlns:msxsl=""urn:schemas-microsoft-com:xslt"" xmlns:var=""http://schemas.microsoft.com/BizTalk/2003/var"" exclude-result-prefixes=""msxsl var s0 ScriptNS0"" version=""1.0"" xmlns:ns0=""http://www.MoustafaRefaat.com/DrugPriceSchema"" xmlns:s0=""http://www.MoustafaRefaat.com/GreenShieldFlatFileSchema"" xmlns:ScriptNS0=""http://schemas.microsoft.com/BizTalk/2003/ScriptNS0"">
  <xsl:output omit-xml-declaration=""yes"" method=""xml"" version=""1.0"" />
  <xsl:template match=""/"">
    <xsl:apply-templates select=""/s0:Entries"" />
  </xsl:template>
  <xsl:template match=""/s0:Entries"">
    <ns0:Prices>
      <xsl:for-each select=""Entry"">
        <DrugPrice>
          <DIN_NBR>
            <xsl:value-of select=""DIN_NBR/text()"" />
          </DIN_NBR>
          <Package_Size>
            <xsl:value-of select=""PACKAGE_SIZE/text()"" />
          </Package_Size>
          <xsl:variable name=""var:v1"" select=""ScriptNS0:GetNewPrice(string(MANUFACTURER_CODE/text()) , string(PROVINCIAL_PRICE/text()) , string(MANUFACTURER_PRICE/text()) , string(WHOLESALE_PRICE/text()))"" />
          <NewAMT>
            <xsl:value-of select=""$var:v1"" />
          </NewAMT>
          <xsl:value-of select=""./text()"" />
        </DrugPrice>
      </xsl:for-each>
      <xsl:value-of select=""./text()"" />
    </ns0:Prices>
  </xsl:template>
</xsl:stylesheet>";
        
        private const string _strArgList = @"<ExtensionObjects>
  <ExtensionObject Namespace=""http://schemas.microsoft.com/BizTalk/2003/ScriptNS0"" AssemblyName=""BTSPracCourse.Maps.Scrpits, Version=1.0.0.0, Culture=neutral, PublicKeyToken=e56921b90feec973"" ClassName=""BTSPracCourse.Maps.Scripts.GreenShiledScripts"" />
</ExtensionObjects>";
        
        private const string _strSrcSchemasList0 = @"BTSPracCourse.Schemas.Sample.GreenShieldFlatFileSchema";
        
        private const BTSPracCourse.Schemas.Sample.GreenShieldFlatFileSchema _srcSchemaTypeReference0 = null;
        
        private const string _strTrgSchemasList0 = @"BTSPracCourse.Schemas.Sample.DrugPriceSchema";
        
        private const BTSPracCourse.Schemas.Sample.DrugPriceSchema _trgSchemaTypeReference0 = null;
        
        public override string XmlContent {
            get {
                return _strMap;
            }
        }
        
        public override string XsltArgumentListContent {
            get {
                return _strArgList;
            }
        }
        
        public override string[] SourceSchemas {
            get {
                string[] _SrcSchemas = new string [1];
                _SrcSchemas[0] = @"BTSPracCourse.Schemas.Sample.GreenShieldFlatFileSchema";
                return _SrcSchemas;
            }
        }
        
        public override string[] TargetSchemas {
            get {
                string[] _TrgSchemas = new string [1];
                _TrgSchemas[0] = @"BTSPracCourse.Schemas.Sample.DrugPriceSchema";
                return _TrgSchemas;
            }
        }
    }
}
